<?xml version='1.0' encoding='UTF-8' ?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                template="./templates/base_template.xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui">


    <ui:define name="content">
        <h3>Voici le détail du compte</h3>
        <f:view>
            <h:form>
                <h1><h:outputText value="Create/Edit"/></h1>
                <h:panelGrid columns="2">
                    <h:outputLabel value="Proprietaire:" for="proprietaire" />
                    <h:inputText id="proprietaire" value="#{gestionnaireDeComptes.details.proprietaire}" title="Proprietaire" />
                    <h:outputLabel value="Solde:" for="solde" />
                    <h:inputText id="solde" value="#{gestionnaireDeComptes.details.solde}" title="Solde" />
                    <h:outputLabel value="Id:" for="id" />
                    <h:inputText id="id" value="#{gestionnaireDeComptes.details.id}" title="Id" />
                    <h:commandButton id="back" value="Back" action="#{gestionnaireDeComptes.list}"/>  
                    <h:commandButton id="update" value="Update" action="#{gestionnaireDeComptes.update}"/> 

                </h:panelGrid>
            </h:form>
        </f:view>

        <h:form>  
            <p:dataTable var="ope" value="#{gestionnaireDeComptes.listOpe}">  

                <p:column headerText="Operation n°">  
                    <h:outputText value="#{ope.id}" />  
                </p:column>  
                <p:column headerText="Description">  
                    <h:outputText value="#{ope.description}" />  
                </p:column>  
                <p:column headerText="Montant">  
                    <h:outputText value="#{ope.montantImplique}" />  
                </p:column>  
                <p:column headerText="Date">  
                    <h:outputText value="#{ope.dateOperation}" />  
                </p:column>  

            </p:dataTable>  
        </h:form>  

    </ui:define>
</ui:composition>

